package notifyandwait;

/**
 * Created by 5406160@qq.com on LiBoWen 李博闻.
 *
 * @ClassName : ThreadDemo
 * @Author : 54061
 * @Date: 2022/2/15 19:19
 */
public class ThreadDemo {
    public static void main(String[] args) {
        //创建包子对象
        BaoZi bz = new BaoZi();
        //创建线程对象 把包子对象传递给2个线程对象
        Customer customer  = new Customer("猪八戒",bz);
        Cook cook = new Cook("中华小当家",bz);

        //启动线程
        customer.start();
        cook.start();
    }
}
